package com.myschool.server.model;

import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name="home_work")
public class HomeWork extends BaseEntity {
	@ManyToOne(cascade=CascadeType.ALL,fetch=FetchType.LAZY)
	private Work work;
	
	@OneToMany(cascade=CascadeType.ALL,fetch=FetchType.LAZY)
	private Set<Solution> solutions;
	
	@ManyToOne(cascade=CascadeType.ALL,fetch=FetchType.LAZY)
	private Section section;

	/**
	 * @return the work
	 */
	public Work getWork() {
		return work;
	}

	/**
	 * @param work the work to set
	 */
	public void setWork(Work work) {
		this.work = work;
	}

	/**
	 * @return the solutions
	 */
	public Set<Solution> getSolutions() {
		return solutions;
	}

	/**
	 * @param solutions the solutions to set
	 */
	public void setSolutions(Set<Solution> solutions) {
		this.solutions = solutions;
	}

	/**
	 * @return the section
	 */
	public Section getSection() {
		return section;
	}

	/**
	 * @param section the section to set
	 */
	public void setSection(Section section) {
		this.section = section;
	}
	
	
}
